export interface FormFieldBase {
  name: string;
  label: string;
  type: 'text' | 'radio' | 'checkbox' | 'number' | 'custom';
  error?: {
    type: string
    message: string
  }[];
  required?: boolean
}

export interface RadioField extends FormFieldBase {
  type: 'radio';
  radioData: { label: string, value: string }[];
  radioLayout: 'row' | 'col'
}

export interface NumberField extends FormFieldBase {
  type: 'number';
  min?: number;
  max?: number;
}

export interface CheckboxField extends FormFieldBase {
  type: 'checkbox';
}

export interface TextField extends FormFieldBase {
  type: 'text';
  minlength?: string
}

export interface CustomField extends FormFieldBase {
  type: 'custom';
}

export type FormField = FormFieldBase | RadioField | NumberField | CheckboxField | TextField | CustomField;
export type FormFieldType = 'text' | 'radio' | 'checkbox' | 'number' | 'custom';
